function Label(x, y, n)
{
  this.x = x;
  this.y = y;
  this.n = n;
}

function Circle(x, y, r)
{
  this.x = x;
  this.y = y;
  this.r = r;
}

function hash(p)
{
  return ((p.x + p.y)*(p.x + p.y + 1)/2) + p.y;
}

Circle.prototype.circumference =
  function ()
  {
    return 2 * Math.PI * this.r;
  }

function display(label)
{
  return label.x + label.y + label.n;
}

var c = new Circle(30, -5, 10);
var l =  {x: 50, y:50, n:"Destination"};
hash(c);
c.circumference();
hash(l);
display(l);
